#region Usings

using System;
using Castle.ActiveRecord;
using Karma.Framework.Core.Domain;

#endregion

namespace Karma.Framework.Core.Metadata.Mapping
{
    [ActiveRecord("[Field]"), JoinedBase]
    public abstract class Field : DomainObject
    {
        [JoinedKey]
        public override Int64 Id { get; set; }

        [BelongsTo("[Editor]")]
        public Editor Editor { get; set; }

        [BelongsTo("[Section]")]
        public Section Section { get; set; }

        [BelongsTo("[View]")]
        public View View { get; set; }

        [Property]
        public string Description { get; set; }

        [Property]
        public string Label { get; set; }

        [Property(NotNull = true)]
        public string Name { get; set; }

        [Property]
        public string SectionName { get; set; }

        [Property(NotNull = true)]
        public bool Nullable { get; set; }

        [Property(NotNull = true)]
        public FieldAccess Access { get; set; }

    }
}